package com.mrx.spring.user.controller;

import com.mrx.commons.model.dto.Result;
import com.mrx.spring.user.model.po.UserPO;
import com.mrx.spring.user.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Mr.X
 * @since 2023-12-10 上午 10:36:21
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    public Result<?> login(@RequestBody UserPO user) {
        return Result.success(userService.login(user));
    }

}
